// -*- IDL -*-

/**
 *  @file   Messaging_No_Impl.pidl
 */

#ifndef TAO_MESSAGING_NO_IMPL_PIDL
#define TAO_MESSAGING_NO_IMPL_PIDL

#include "tao/TimeBase.pidl"
#include "tao/Policy.pidl"
#include "tao/Messaging/Messaging_Types.pidl"

#pragma prefix "omg.org"

module Messaging
{
  //
  // Messaging Quality of Service
  //

  typedef short Priority;

  typedef short RebindMode;
  const RebindMode TRANSPARENT  = 0;
  const RebindMode NO_REBIND    = 1;
  const RebindMode NO_RECONNECT = 2;

  typedef short RoutingType;
  const RoutingType ROUTE_NONE              = 0;
  const RoutingType ROUTE_FORWARD           = 1;
  const RoutingType ROUTE_STORE_AND_FORWARD = 2;

  typedef unsigned short Ordering;
  const Ordering ORDER_ANY      = 0x01;
  const Ordering ORDER_TEMPORAL = 0x02;
  const Ordering ORDER_PRIORITY = 0x04;
  const Ordering ORDER_DEADLINE = 0x08;

  //
  // Locally-Constrained Policy Objects
  //

  /// Rebind Policy (default = TRANSPARENT)
  local interface RebindPolicy : CORBA::Policy {
    readonly attribute RebindMode rebind_mode;
  };

  /// Priority Policies
  struct PriorityRange {
    Priority min;
    Priority max;
  };
  local interface RequestPriorityPolicy : CORBA::Policy {
    readonly attribute PriorityRange priority_range;
  };
  local interface ReplyPriorityPolicy : CORBA::Policy {
    readonly attribute PriorityRange priority_range;
  };

  /// Timeout Policies
  local interface RequestStartTimePolicy : CORBA::Policy {
    readonly attribute TimeBase::UtcT start_time;
  };
  local interface RequestEndTimePolicy : CORBA::Policy {
    readonly attribute TimeBase::UtcT end_time;
  };

  local interface ReplyStartTimePolicy : CORBA::Policy {
    readonly attribute TimeBase::UtcT start_time;
  };
  local interface ReplyEndTimePolicy : CORBA::Policy {
    readonly attribute TimeBase::UtcT end_time;
  };

  local interface RelativeRequestTimeoutPolicy : CORBA::Policy {
    readonly attribute TimeBase::TimeT relative_expiry;
  };

  struct RoutingTypeRange {
    RoutingType min;
    RoutingType max;
  };
  local interface RoutingPolicy : CORBA::Policy {
    readonly attribute RoutingTypeRange routing_range;
  };

  local interface MaxHopsPolicy : CORBA::Policy {
    readonly attribute unsigned short max_hops;
  };

  /// Router Delivery-ordering Policy (default = ORDER_TEMPORAL)
  local interface QueueOrderPolicy : CORBA::Policy {
    readonly attribute Ordering allowed_orders;
  };
};

#endif /*TAO_MESSAGING_NO_IMPL_PIDL*/
